import type { RouteRecordRaw } from 'vue-router';

import Layout from '@/layouts/index.vue';

export const formRoutes: RouteRecordRaw[] = [
  {
    path: '/form',
    name: 'FormRoot',
    component: Layout,
    redirect: '/form/basic-form',
    meta: {
      title: '表单页',
      icon: 'FileList1',
      authCodes: ['FM_FORM'],
      visible: true,
    },
    children: [
      {
        path: '/form/basic-form',
        name: 'BasicForm',
        component: () => import('@/views/form/basic-form/index.vue'),
        meta: {
          authCodes: ['FM_BASIC_FORM'],
          title: '混合表单',
        },
      },
      {
        path: '/form/group-form',
        name: 'GroupForm',
        component: () => import('@/views/form/group-form/index.vue'),
        meta: {
          authCodes: ['FM_GROUP_FORM'],
          title: '卡片分组表单',
        },
      }
    ],
  }
];
